<?php
/**
 * Project:     Securimage: A PHP class for creating and managing form CAPTCHA images<br />
 * File:        securimage_show.php<br />
 *
 * Copyright (c) 2011, Drew Phillips
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 *  - Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *  - Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * Any modifications to the library should be indicated clearly in the source code
 * to inform users that the changes are not a part of the original software.<br /><br />
 *
 * If you found this script useful, please take a quick moment to rate it.<br />
 * http://www.hotscripts.com/rate/49400.html  Thanks.
 *
 * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
 * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
 * @copyright 2011 Drew Phillips
 * @author Drew Phillips <drew@drew-phillips.com>
 * @version 3.0 (October 2011)
 * @package Securimage
 *
 */
require_once 'securimage.php';
require_once '../../../../config/autoload.php';

/* Load all configuration keys */
Configuration::loadConfiguration();

$img = new securimage();

// Adjusting Image Size	
$img->image_height    = Configuration::get('ZPRO_HEIGHT_IMG');			// height of the captcha image 55
$img->image_width     = Configuration::get('ZPRO_WIDTH_IMG'); 			// width of the captcha image 190

// Changing Colors
$img->text_color      = new Securimage_Color(Configuration::get('ZPRO_TEXT_COLOR'));    // captcha text color EAEAEA
$img->line_color      = new Securimage_Color(Configuration::get('ZPRO_LINE_COLOR'));   	// color of lines over the image 0000CC
$img->image_bg_color  = new Securimage_Color(Configuration::get('ZPRO_BG_COLOR'));    // image background color 0099CC

// Change Difficulty
$img->code_length     = Configuration::get('ZPRO_CODE_LENGTH'); 	// code length	6
$img->num_lines       = Configuration::get('ZPRO_NUMBER_LINE');  	// number lines drawing over the image	8
//$img->perturbation    = Configuration::get('ZPRO_PERTURBATION');  	// how distorted the characters		(0.75)
														    		// 1.0 = very high distortion, it is not recommended to go over 1, 
																	// 0 = no distortion

// Adding A Signature	
$img->image_signature = Configuration::get('ZPRO_SIGNATURE_TEXT');							// signature text
$img->signature_color = new Securimage_Color(Configuration::get('ZPRO_SIGNATURE_COLOR'));	// signature color '#000000'

// Custom Fonts		
//$img->ttf_file        = './fonts/AHGBold.ttf';				// ./fonts/Quiff.ttf,  ./fonts/AHGBold.ttf		
	
// Changing the Character Set
// The default character is a subset of the range [a-zA-Z0-9],
//$img->charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';				// Use only capital letters from A-Z for the captcha code
//$img->charset = '0123456789';								// A numeric only captcha
//$img->charset = 'abcdefghklmnprstuvwyz23456789';			// lowercase letters and numbers excluding ambiguous characters

$img->show('backgrounds/bg6.jpg');	//bg3.jpg, bg4.jpg, bg5.jpg, bg6.jpg
